mem_access: introduce P2M mem_access types
authorJoe Epstein <jepstein98@gmail.com>
Fri, 7 Jan 2011 11:54:36 +0000 (11:54 +0000)
committerJoe Epstein <jepstein98@gmail.com>
Fri, 7 Jan 2011 11:54:36 +0000 (11:54 +0000)
commita6cdb9545035b731802de41e10b2b43ef4ffd9c0
tree480cbb3375815ef8375881f0ed85be73dd031a5e
parent84be7c5af430f29af3db1304c763281579b04d4f
mem_access: introduce P2M mem_access types

* Introduces access types for each page, giving independent read, write, and
  execute permissions for each page.  The permissions are restrictive from
  what the page type gives: for example, a p2m_type_ro page with an access of
  p2m_access_rw would have read-only permissions in total, as p2m_type_ro
  removed write access and p2m_access_rw removed execute access.

* Implements the access flag storage for EPT, moving some bits from P2M type,
  which had 10 bits of storage, to the four bits for access.

* Access flags are stored according to a loose consistency contract, where
  pages can be reset to the default access permissions at any time.  Right
  now, that happens on page type changes, where one would want to reevaluate
  whether permissions make sense for that page as they are anyway.

Signed-off-by: Joe Epstein <jepstein98@gmail.com>
Acked-by: Tim Deegan <Tim.Deegan@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/mm/hap/p2m-ept.c
xen/arch/x86/mm/p2m.c
xen/include/asm-x86/hvm/vmx/vmx.h
xen/include/asm-x86/p2m.h